<div class="editcate_top">
    <h2>Edit user</h2>
    <a href="javascript:void(0)" onclick ="$('#light_adct').hide();$('#fade_adct').hide()"><img src="<?php echo img_link('close.png', 'admin'); ?>" class="png" /></a>
</div>

<div id="div_message"></div>

<form enctype="multipart/form-data" method="post" action="<?php echo action_link('edit/'.$user->user_id); ?>" id="user_form">
<div class="editcate_ct">
	<div class="boxadd">
    	<ul class="linect">
            <li>
                <span class="left"><b>Username :</b></span>
                <span class="right"><input type="text" name="username"  value="<?php echo $user->username; ?>" readonly="true" style="width:100%;" /></span>
            </li>
            <li>
                <span class="left"><b>Password: </b></span>
                <span class="right"><input name="password" type="password" style="width:100%;"></span>
            </li>
            <li>
                <span class="left"><b>Email: </b></span>
                <span class="right"><input name="email" value="<?php echo set_value('email', $user->email); ?>" type="text" style="width:100%;"></span>
            </li>
            
            <li>
                <span class="left"><b>User group: </b></span>
                <span class="right">
				    <select name="group_id" style="width: 200px; margin-left:5px;">
				        <?php foreach($group_list as $i => $g): ?>
				        <option <?php if($g['group_id'] == set_value('group_id', $user->group_id)) echo 'selected'; ?> value="<?php echo $g['group_id']; ?>"><?php echo ucfirst($g['group_name']); ?></option>
				        <?php endforeach; ?>
				    </select>
                </span>
            </li>
       
        </ul>
    </div>
    <div class="btarticle">
    	<input type="button" value="Cancel" class="btn" onclick="$('#light_adct').hide();$('#fade_adct').hide();" />
        <input type="submit" value="Save & Continute" class="btn" />

    </div>
</div>
</form>
<script>
$('#user_form').iframer({
    onComplete: function(msg){
    	if(msg == 'yes') {
    		$('#light_adct').hide();$('#fade_adct').hide();
            load_content('row_<?php echo $user->user_id; ?>', admin_url+'user/load_row/<?php echo $user->user_id; ?>');
            $('.linecate2').has('#row_<?php echo $user->user_id; ?>').css('background-color', '#FFFFE0');
    	}
    	else show_error('div_message', msg)
    }
});
</script>
